<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<FiltronASP.Areas.Admin.ViewModels.Users.UsersEditionViewModel>" ValidateRequest="false" %>
<%@ Import Namespace="FiltronASP.Areas.Admin.Consts" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edycja użytkownika
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <% Html.BeginForm("UpdateUser", "Users", FormMethod.Post, new { name = "userForm" }); %>
    <% if (Model.CurrentLanguage != null) { %>
        <%= Html.HiddenFor(m => Model.CurrentLanguage.language_id) %>
    <% }    //if %>            
    <%= Html.HiddenFor(m => Model.PaginationPage) %>
    <%= Html.HiddenFor(m => Model.UserToOperateWith.user_id)%>
    <div class="right-page-item">
         <div class="right-page-item300">
			    <label for="first_name">Imię:</label>
                    <%= Html.EditorFor(m => Model.UserToOperateWith.user_first_name, "InputText300")%>
                    <%= Html.ValidationMessageFor(m => Model.UserToOperateWith.user_first_name)%>
				</div>

			<div class="right-page-item400">
				 <label for="last_name">Nazwisko:</label>
                    <%= Html.EditorFor(m => Model.UserToOperateWith.user_last_name, "InputText400")%>
                    <%= Html.ValidationMessageFor(m => Model.UserToOperateWith.user_last_name)%>
			</div>	
		</div>
		<div class="right-page-item">
			<div class="right-page-item300">
				<label for="login">Login:</label>
                    <%= Html.EditorFor(m => Model.UserToOperateWith.user_login, "InputText300")%>	
			</div>
			<div class="right-page-item400">
				 <label for="email">Email:</label>
                    <%= Html.EditorFor(m => Model.UserToOperateWith.user_mail_address, "InputText400")%>
                    <%= Html.ValidationMessageFor(m => Model.UserToOperateWith.user_mail_address)%>
            </div>
        <div class="right-page-buttons">
            <span class="button2" onclick="history.back();">Anuluj</span>
			<span class="button2" onclick="document.forms['userForm'].submit();">Zapisz zmiany</span> 
        </div>
    
    <% Html.EndForm(); %>
    
    <% Html.BeginForm("UpdateUserPassword", "Users", FormMethod.Post, new { name = "userPassForm" }); %>
    <% if (Model.CurrentLanguage != null) { %>
        <%= Html.HiddenFor(m => Model.CurrentLanguage.language_id) %>
    <% }    //if %>        
    <%= Html.HiddenFor(m => Model.PaginationPage) %>
    <%= Html.HiddenFor(m => Model.UserToOperateWith.user_id)%>
    <div class="right-page-item">
         <div class="right-page-item">
			<div class="right-page-item300">
				<label for="password">Hasło:</label>
                    <%= Html.EditorFor(m => Model.password, "PasswordInputText300")%>
                    <%= Html.ValidationMessageFor(m => Model.password)%>
			</div>
			<div class="right-page-item400">
				<label for="confirm_password">Powtórz hasło:</label>
                    <%= Html.EditorFor(m => Model.confirmPassword, "PasswordInputText400")%>
                    <%= Html.ValidationMessageFor(m => Model.confirmPassword)%>
			</div>																												
		</div> 	
        <div class="right-page-buttons">
            <span class="button2" onclick="history.back();">Anuluj</span>
			<span class="button2" onclick="document.forms['userPassForm'].submit();">Zapisz zmiany</span> 
        </div>
    
    <% Html.EndForm(); %>
    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
	Edycja użytkownika
</asp:Content>
